package com.ldc.commonlibs.uts

import androidx.appcompat.app.AlertDialog
import com.alibaba.android.arouter.launcher.ARouter
import com.ldc.commonlibs.conf.RouteConf

object DialogUtils {

    fun showLoginDialog(title: String, message: String) {
        val dialog = AlertDialog.Builder(
            ActivityUtils
                .getTopActivity()
        ).setMessage(message)
            .setTitle(title)
            .setNegativeButton("取消", null)
            .setPositiveButton("去登录") { dialog, _ ->
                dialog.dismiss()
                ARouter.getInstance().build(RouteConf.LoginRoute.startEnter)
                    .navigation()

            }
            .create().show()
    }
}